﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using DG.Tweening;

public class DiedOrWinUIController : MonoBehaviour
{
    public Transform player;
    public Transform boss;
    void Update()
    {
        if (player != null)
        {
            if (player.GetComponent<PlayerController>().hp <= 0)
            {
                transform.DOLocalMoveY(0, 0.2F);
            }
        }

        if (boss == null)
        {
            transform.DOLocalMoveY(0, 0.2F);
        }
    }

    public void AgainOnClick()
    {
        SceneManager.LoadScene("MainScene");
    }

    public void QuitOnClick()
    {
        Application.Quit();
    }
}
